﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace InterestCalculationBiz
{
  public class LoanProperties
    {
      private string _loanDate = "";
      private string _fRepaymentDate = "";
      private string _newRepaymentDate = "";
      private string _startDate = "";
      private string _nextRepaymentDue = "";
        public Int64 App_Id
        {
            get;
            set;
        }
        public int Frequency
        {
            get;
            set;
        }
        public Double Principal
        {
            get;
            set;
        }
        public double LoanDuration
        {
            get;
            set;
        }
        public Double InterestRate
        {
            get;
            set;
        }
        public string FirstRepaymentDate
        {
            get{return _fRepaymentDate;}
            set{_fRepaymentDate=LoanMethod.OutputDateFormat(value);}
        }
        public string LoanDate
        {
            get{return _loanDate;}
            set{_loanDate=LoanMethod.OutputDateFormat(value);}
        }
        public Double OtherCharges
        {
            get;
            set;
        }
        public Double BrokerageFee
        {
            get;
            set;
        }
        public Double CreditSearchFee
        {
            get;
            set;
        }
        public Double EstabalishmentFee
        {
            get;
            set;
        }
        public Double MonthlyFee
        {
            get;
            set;
        }
        public Double SecurityFee
        {
            get;
            set;
        }
      /// <summary>
      /// Loan Type will be =ChangeRate,ChangeAllPayment,ChangeFrequence,ChangeSinglePayment,MaximumInterestRate
      /// </summary>
        public string LoanType
        {
            get;
            set;
        }
        public Boolean IsUpdate
        {
            get;
            set;
        }
        public string NewRepaymentDate
        {
            get { return _newRepaymentDate; }
            set { _newRepaymentDate = LoanMethod.OutputDateFormat(value); }
        }
        public double NewTerm
        {
            get;
            set;
        }
        public double NewInterestRate
        {
            get;
            set;
        }
        public string StartDate
        {
            get { return _startDate; }
            set { _startDate = LoanMethod.OutputDateFormat(value); }
        }
        public double Repayment
        {
            get;
            set;
        }
        public string NextRepaymentDue
        {
            get { return _nextRepaymentDue; }
            set { _nextRepaymentDue = LoanMethod.OutputDateFormat(value); }
        }
        public int NextFrequency
        {
            get;
            set;
        }
        public double[] SingleRepayment
        {
            get;
            set;
        }
        public int[] applypayhash
        {
            get;
            set;
        }
        public double DesiredACR
        {
            get;
            set;
        }
    }
}
